﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.VisualBasic; 
namespace 健身房管理
{
    public partial class UserDashForm : Form
    {

        public int random111 = 0;
        public UserDashForm()
        {
           
            InitializeComponent();
            //UsersHome uH_ = new UsersHome();
            //uH_.id = this.random111;
            //addUserControl(uH_);
        }

        private void addUserControl(UserControl uc)
        {
            paneC.Controls.Clear();  //清空显示页面
            uc.Dock = DockStyle.Fill;         //当前要添加的页面 填充满
            uc.BringToFront();
            paneC.Controls.Add(uc);
        }

        private void guna2ImageButton3_Click(object sender, EventArgs e)
        {
            UsersHome uH_ = new UsersHome();
            uH_.id = this.random111;
            addUserControl(uH_);
        }

        private void guna2ImageButton5_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void UserDashForm_Load(object sender, EventArgs e)
        {
            
        }

        private void guna2ImageButton1_Click(object sender, EventArgs e)
        {
            UGoods uG_ = new UGoods();
            
            addUserControl(uG_);
        }

        private void guna2ImageButton2_Click(object sender, EventArgs e)
        {
            Umessage uM_ = new Umessage();

            addUserControl(uM_);
        }

        private void guna2ImageButton4_Click(object sender, EventArgs e)
        {
            Uconcerning uc_ = new Uconcerning();
           
            addUserControl(uc_);
        }
    }
}
